package com.zzuli.yxy.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.poi.ss.usermodel.FillPatternType;

import java.util.ArrayList;
import java.util.List;

/**
 * 职工权限表实体类
 * @auther pony
 * @create 2023-03-13 16:13
 *
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ContentRowHeight(20) //设置内容高度
@HeadRowHeight(20) //设置标题高度
@ColumnWidth(10) //列宽
//标题背景色设为绿色 42
@HeadStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND, fillForegroundColor = 42)
//标题字体
@HeadFontStyle(fontHeightInPoints = 10)
public class Menu {
    @ColumnWidth(5) //列宽
    @ExcelProperty("序号")
    private Integer id; //权限 id
    @ColumnWidth(20) //列宽
    @ExcelProperty("权限名称")
    private String menu; //权限名称
    private String path; //权限路径
    @ColumnWidth(30) //列宽
    @ExcelProperty("权限关键字")
    private String perms; //权限关键字
    private Integer parentId; //权限id
    private Integer orderId; //权限排序关键字
    @ColumnWidth(30) //列宽
    @ExcelProperty("权限图标")
    private String icon; //权限图标
    @ExcelProperty("权限状态")
    private Integer status; //权限状态
    @ColumnWidth(40) //列宽
    @ExcelProperty("权限备注信息")
    private String remarks; //权限备注信息

    @TableField(exist = false) //此属性不映射数据库
    private List<Menu> children = new ArrayList<>(); //子菜单
}
